package com.example.click.huanxin.ui;

import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by Chen qin lang on 2016/12/29.
 * 邮箱 :   619766577@qq.com
 */
public  class BaseActivity extends AppCompatActivity {

    private ProgressDialog progressDialog;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        progressDialog = new ProgressDialog(this);
    }
    public  void showDialog(String msg){
        progressDialog.setTitle(msg);
        progressDialog.show();
    }
    public void hideDialog(){
        if (progressDialog!=null){
            progressDialog.dismiss();
        }
    }
    public void startActivity(Class clazz){
        Intent intent=new Intent(this,clazz);
        startActivity(intent);
    }

}
